package com.java.pay.api;

import com.java.common.vo.R;
import com.java.pay.entity.PaymentInfo;
import com.java.pay.entity.PaymentType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author jiangli
 * @since 2019/12/15 19:30
 */
public interface PayApi {

	/**
	 * 创建支付交易信息
	 */
	@PostMapping("/pay/addPayInfoToken")
	R addPaymentInfo(@RequestBody PaymentInfo paymentInfo);
	/**
	 * 通过token查询支付信息
	 */
	@GetMapping("/pay/getPayInfoToken")
	PaymentInfo getPayInfoByToken(@RequestParam("token") String token);
	/**
	 * 使用订单id查询支付信息
	 */
	@GetMapping("/pay/getByOrderIdPayInfo")
	PaymentInfo getPayInfoByOrderId(@RequestParam("orderId") String orderId);
	/**
	 * 修改支付信息
	 */
	@PostMapping("/pay/updatePayInfo")
	R updatePayInfo(@RequestBody PaymentInfo paymentInfo);
	/**
	 * 通过paymentTypeId查询paymentType
	 */
	@GetMapping("/pay/getPaymentType")
	PaymentType getPaymentTypeById(@RequestParam("id") Long id);
}
